<template>
  <AuthFormCard
    main-btn-name="注册"
    sub-btn-name="登陆"
    re
    showTags
    @main="handleMain"
    @sub="$router.push('/manager/login')"
  />
</template>

<script setup lang="ts">
import AuthFormCard from '@/components/auth/AuthFormCard.vue';
import { accountRegister } from '@/api';
import { AuthUSerType } from '@/types/user';
import { useBackStore } from '@/store/background';
import { useRouter } from 'vue-router';

const back = useBackStore();
function handleMain(params: AuthUSerType) {
  accountRegister(params).then(res => {
    console.log(res);
    setTimeout(() => useRouter().push('/manager/login'), 2000);
  });
}
</script>

<style scoped></style>
